package com.gitee.wsl.android.ext.device

import android.app.AlarmManager
import android.content.Context
import android.os.Build
import com.gitee.wsl.android.ext.ApplicationInit.application


val globalAlarmManager: AlarmManager by lazy{
    application.getSystemService(Context.ALARM_SERVICE) as AlarmManager
}
object AlarmExt {

}
val AlarmManager.grantedAlarms:Boolean
    get() = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
        canScheduleExactAlarms()
    } else {
         true
    }